<@admin.header title="系统日志列表">
<script type="text/javascript">
    $(document).ready(function(){
    	
    });
	
	function toCategory(cat){
		$("#category_").val(cat);
		toPage(1);
	}
</script>
<style>
	.red {color:#f11;font-weight:bold;}
	
	.tools .category {margin-left:10px;font-size:14px;line-height:32px;}
	.tools a.active {color:#3451ff;font-weight:bold;}
	
	.ll {word-wrap:break-word; line-height:100%;text-indent:0px;}
</style>
</@admin.header>
    <body>
        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li>
                    <a href="#">首页</a>
                </li>
                <li>
                    <a href="#">系统日志列表</a>
                </li>
            </ul>
        </div>
        <div class="rightinfo">
        	<!--默认查询表单-->
        <form action="list.do" method="post" id="searchForm">
            <input type="hidden" name="pageNo" value="1" id="pageNo"/>
			<input type="hidden" name="category" value="${category}" id="category_"/>
            <div class="tools">
                <ul class="toolbar">
                    <li style="padding:0 0">
                        <span style="margin:0px 5px">关键字</span>
	                	<input name="keyword" value="${keyword!''}" type="text" class="dfinput" style="width:160px;" />&nbsp;
                    </li>
                    <li>
						<a href="javascript:toPage();"><span><img src="${base}/resources/images/search24.png" /></span>查找</a>
                    </li>
					<a class="category <#if category==''>active</#if>" href="javascript:;" onclick="toCategory('');">全部</a>
					<a class="category <#if category=='USER'>active</#if>" href="javascript:;" onclick="toCategory('USER');">用户</a>
					<a class="category <#if category=='PERMISSION'>active</#if>" href="javascript:;" onclick="toCategory('PERMISSION');">权限</a>
					<a class="category <#if category=='MENU'>active</#if>" href="javascript:;" onclick="toCategory('MENU');">菜单</a>
					<a class="category <#if category=='ROLE'>active</#if>" href="javascript:;" onclick="toCategory('ROLE');">角色</a>
					<a class="category <#if category=='LOG'>active</#if>" href="javascript:;" onclick="toCategory('LOG');">日志</a>
                </ul>
            </div>
			</form>
            <table class="tablelist">
                <thead>
                    <tr>
                    	<th width="35">
                       		 编号
	                    </th>
	                    <th width="350">操作</th>
	                    <th>备注</th>
	                    <th width="120">分类</th>
	                    <th width="80">操作者</th>
	                    <th width="160">操作时间</th>
                    </tr>
                </thead>
                <tbody>
                	<#if page??>
					<#list page.list as d>
                    <tr id="tr_${d.id}">
                    	<td>${d_index+1}</td>
						<#if keyword?? && keyword != "">
						<td>${d.message?replace(keyword,"<span class='red'>"+keyword+"</span>")}</td>
	                    <td>
	                    	<div class="ll">
	                    	<#if d.remark??>
							${d.remark?replace(keyword,"<span class='red'>"+keyword+"</span>")}
							</#if>
							</div>
	                    </td>
						<#else>
						<td>${d.message!''}</td>
	                    <td><div class="ll">${d.remark!''}</div></td>
						</#if>
	                    <td>${d.category!''}</td>
	                    <td>${d.userName!''}</td>
	                    <td>${d.date!''}</td>
                    </tr>
					</#list>
					</#if>
                </tbody>
            </table>
			<@common.pagination />
        </div>
    </body>
</html>